Rick Rolls the Golden dice:
It has 3 phases:
1. Never Gonna Give You Up (The Digital Intelligent Coding Exhibit)
Codec for each metal:
Lead=Gold(1). (7-1=6 metals it requires from lead to reach gold)
Tin=Lead+Gold(2) (7-2=5...you get the idea)
Iron=lead+tin+gold
and so on)
2. Never Gonna Let You Down (The Digital Intelligent Cloning Exhibit)
First clone is made using the codec(apart from gold, which will be attached to each metal of the input. if gold, then attach quicksilver as a marker
Second clone is made with lead and quicksilver
3. Never Gonna Run Around And Desert You(The Digital Intelligent Comparison Exhibit)
Compares 2 consecutive metals. If metals are the same but not gold, it should purify, then increment the counter by 1. else, if there is a gold marker, it attaches to the next counter. else, just insert the next counter.
The quicksilver detection mechanism works like this:
If that is the first quicksilver of the chain, it won't use it right away. But from the second quicksilver onward, it will feed the gold counter. The moment it stops getting quicksilver, it returns the counter it was attached to in the output string. 
Addendum EX 1:The previous notes were, unfortunately, lost, so i had to rewrite them.I will just hope there will be no more errors...